package com.dg.cuckoo.admin.repository;

import com.dg.cuckoo.admin.dto.proCarryOut.ProChangeDto;
import com.dg.cuckoo.core.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProChangeRepository extends BaseRepository<ProChangeDto,String> {

    List<ProChangeDto> findByProjectIdAndChangeType(String projectId,Integer changeType);

    @Query(value = "select * from pro_change where project_id=? and change_type=? limit ?,?",nativeQuery = true)
    List<ProChangeDto> page(String project,Integer changeType,Integer page,Integer pageSize);

}
